<?php

/**
* Element a script text inside html code.
* You may add text to it and it will administre.
* When you are done, call __toString;
* //TODO array, and element functions
*/
class script extends element
{
    public function script( $content = NULL, $type = "text/javascript")
    {
    	parent::element('script',null, null, null, $content );
        $this->type = $type;
    }

    public function addJsCode($newContent)
    {
        $this->addInner($newContent);
    }

    public function alert($newContent)
    {
        $this->addInner("alert('$newContent')");
    }
}
?>